home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 5 / UNZIP_MA / SOURCE / ZIPINFO.1 < prev    next >
Text File  |  1992-03-19  |  6KB  |  143 lines

  1. .TH unzip 1 "ZipInfo version 0.96"
  2. .SH NAME
  3. zipinfo - list detailed information about a ZIP archive file
  4. .SH SYNOPSIS
  5. zipinfo [-1lv] file[.zip] [filespec...]
  6. .SH ARGUMENTS
  7. .in +12
  8. .ti -12
  9. file[.zip]  Path of the ZIP archive.  The suffix ``.zip'' is applied
  10. if the file specified does not exist.  Note that
  11. self-extracting ZIP files are supported; just specify
  12. the ``.exe'' suffix yourself.
  13. .sp 1
  14. .ti -12
  15. [filespec]  An optional list of archive members to be processed.
  16. Expressions may be used to match multiple members; be sure to quote
  17. expressions that contain characters interpreted by the UNIX shell. See
  18. PATTERN MATCHING (below) for more details.
  19. .SH OPTIONS
  20. .nf
  21.    -1  list filenames only, one per line (useful for pipes)
  22.    -l  list files in Unix "ls -l" format:  default
  23.    -v  list files in verbose, multi-page format
  24. .fi
  25. .SH DESCRIPTION
  26. .B ZipInfo
  27. lists technical information about a ZIP archive, including information
  28. file access permissions, encryption status, type of compression, version
  29. and operating system of compressing program, and the like.  The default
  30. option is to list files in the following format:
  31. .sp 1
  32. .nf
  33. .ti -5
  34. -rw-rwl---  1.5 unx    2802 t-     538 defX 11-Aug-91 13:48 perms.2660
  35. .fi
  36. .sp 1
  37. The last three fields are clearly the modification date and time of
  38. the file, and its name.  The case of the filename is respected; thus
  39. files which come from MS-DOS are always capitalized.  If the file was
  40. zipped with a stored directory name, that is also displayed as part of
  41. the filename.
  42. .sp 1
  43. The second and third fields indicate that the file was zipped under
  44. Unix with version 1.5 of zip (not available, so don't ask--this is
  45. just an example).  Since it comes from Unix, the file permissions at
  46. the beginning of the line are printed in Unix format.  The uncompressed
  47. file-size (2802 in this example) is the fourth field, and the compressed
  48. file-size is the sixth (538).
  49. .sp 1
  50. The fifth field consists of two characters, either of which may take
  51. on several values.  The first character may be either `t' or `b', indicating
  52. that zip believes the file to be text or binary, respectively; but if the
  53. file is encrypted,
  54. .B ZipInfo
  55. notes this fact by capitalizing the character (`T' or `B').  The second
  56. character may also take on four values, depending on whether there is
  57. an extended local header and/or an ``extra field'' associated with the
  58. file (explained in PKWare's APPNOTE.TXT).  If neither exists, the character
  59. will be a hyphen (`-'); if there is an extended local header but no extra
  60. field, `l'; if the reverse, `x'; and if both exist, `X'.  Thus the
  61. file in this example is (apparently) a text file, is not encrypted, and
  62. has neither an extra field nor an extended local header associated with it.
  63. The example below, on the other hand, is an encrypted binary file with an 
  64. extra field:
  65. .sp 1
  66. .nf
  67. .ti -5
  68. RWD,R,R     0.9 vms     168 Bx     165 shrk  9-Aug-91 19:15 perms.0644
  69. .fi
  70. .sp 1
  71. Extra fields are used by PKWare for authenticity verification (?) and
  72. possibly other purposes, and by an upcoming release of Info-ZIP's zip
  73. for VMS (to store file attributes).  This example presumably falls into
  74. the latter class, then.  Note that the file attributes are listed in
  75. VMS format.  Other possibilities for the host operating system are
  76. OS/2 with High Performance File System
  77. (HPFS), and DOS or OS/2 with File Allocation Table (FAT) file system, denoted
  78. as follows:
  79. .sp 1
  80. .nf
  81. .ti -5
  82. arc,hid,rdo,sys dos    4096 b-    2334 i4:2 14-Jul-91 12:58 EA DATA. SF
  83. .ti -5
  84. arc,,rw,    1.0 os2    5358 Tl    1914 i4:3  4-Dec-91 11:33 longfilename.hpfs
  85. .fi
  86. .sp 1
  87. File attributes in both of these cases are indicated in a DOS-like format,
  88. where the file may or may not have its archive bit set; may be hidden or not;
  89. may be read-write or read-only; and may be a system file or not.  If the
  90. attributes are too long, the version number of the encoding software is
  91. omitted.  (The information is still available in the verbose listing, 
  92. however.)
  93. .sp 1
  94. Finally, the seventh field indicates
  95. the compression method and possible sub-method used.  There are six methods
  96. known at present:  storing (no compression), reducing, shrinking, imploding,
  97. tokenizing, and deflating.  In addition, there are four levels of reducing
  98. (1 through 4); four types of imploding (4K or 8K sliding dictionary, and
  99. 2 or 3 Shannon-Fano trees); and three levels of deflating (fast, normal,
  100. maximum compression).
  101. .B ZipInfo
  102. represents these methods and their sub-methods as follows:  ``stor'';
  103. ``re:1,'' ``re:2,'' etc.; ``shrk''; ``i4:2,'' ``i8:3,'' etc.; ``tokn'';
  104. and ``defF,'' ``defN,'' and ``defX.''
  105. .sp 1
  106. The verbose listing is self-explanatory.  It also lists file comments and
  107. the zipfile comment, if any.
  108. .SH PATTERN MATCHING
  109. All archive members are listed unless a
  110. .B filespec
  111. is provided to specify a subset of the archive members.
  112. The
  113. .B filespec
  114. is similar to an egrep expression, and may contain:
  115. .sp 1
  116. .in +8
  117. .ti -8
  118. *       matches a sequence of 0 or more characters
  119. .ti -8
  120. ?       matches exactly 1 character
  121. .ti -8
  122. \\nnn    matches the character having octal code nnn
  123. .ti -8
  124. [...]   matches any single character found inside the brackets; ranges
  125. are specified by a beginning character, a hyphen, and an ending
  126. character.  If a '!' follows the left bracket, then the range
  127. of characters matched is complemented with respect to the ASCII
  128. character set.
  129. .SH TIPS
  130. The author finds it convenient to set up an alias ``ii'' for 
  131. .B ZipInfo
  132. on systems which allow aliases, or else to set up a batch file ``ii.bat''
  133. or to rename the executable to ``ii.exe'' on systems such as MS-DOS which
  134. have no provision for aliases.  The ``ii'' usage parallels the common
  135. ``ll'' alias for long listings in Unix, and the similarity between the
  136. outputs of the two commands was intentional.
  137. .SH AUTHOR
  138. Greg Roelofs (also known as Cave Newt).
  139. .B ZipInfo
  140. is partly based on
  141. S. H. Smith's unzip and contains pattern-matching code from Thom
  142. Henderson, but mostly it was written from scratch.
  143.